//
//  PersonInfoInputController.m
//  easystudy
//
//  Created by kane on 16/8/31.
//  Copyright © 2016年 kane. All rights reserved.
//

#import "PersonInfoInputController.h"

@interface PersonInfoInputController ()<UITextFieldDelegate>
{

    __weak IBOutlet UIView *inputView;
    __weak IBOutlet UILabel *noticeLbl;
    NSInteger curIndex;
}

@end

@implementation PersonInfoInputController
//@synthesize curIndex;

- (void)viewDidLoad {
    [super viewDidLoad];
    [self initUI];
    switch (_cellRow) {
        case 1:
            [_titleLab setText:@"昵称"];
            break;
        case 4:
            [_titleLab setText:@"电子邮箱"];
            break;
        case 6:
            [_titleLab setText:@"预约联系号码"];
            break;
        case 7:
            [_titleLab setText:@"姓名"];
            break;
        case 13:
            [_titleLab setText:@"职业"];
            break;
        case 14:
            [_titleLab setText:@"学校"];
            break;
        case 15:
            [_titleLab setText:@"公司"];
            break;
        case 16:
            [_titleLab setText:@"情感状态"];
            break;
        default:
            break;
    }
    
}

- (void)initUI
{
//    titleLbl.text = self.dataList[curIndex];
    switch (curIndex) {
        case 0:
        {
            
        } break;
        case 1:
        {
            _inputTF.text = [UserEntity sharedUser].NickName;
        }break;
        case 2:
        {
            _inputTF.text = @"个性签名";
        }break;
        case 3:
        {
            
        }break;
        case 4:
        {
            _inputTF.text = @"(空)";
        } break;
        case 5:
        {
            _inputTF.text = [UserEntity sharedUser].MobilePhone;
        }break;
        case 6:
        {
            _inputTF.text = @"(空)";
        } break;
        case 7:
        {
            _inputTF.text = @"(空)";
        }break;
        case 8:
        {
            _inputTF.text = @"(空)";
        } break;
        case 9:
        {
            _inputTF.text = @"(空)";
        } break;
        case 10:
        {
            _inputTF.text = @"(空)";
        } break;
        case 11:
        {
            _inputTF.text = @"(空)";
        } break;
        case 12:
        {
            _inputTF.text = @"个性签名";
        } break;
        case 13:
        {
            _inputTF.text = @"(空)";
        } break;
        case 14:
        {
            _inputTF.text = @"(空)";
        } break;
        case 15:
        {
            _inputTF.text = @"(空)";
        } break;
        case 16:
        {
            _inputTF.text = @"(空)";
        } break;
        case 17:
        {
            _inputTF.text = @"(空)";
        } break;
        case 18:
        {
            _inputTF.text = @"(空)";
        } break;
        default:
            break;
    }
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (IBAction)backBtnPressed:(id)sender
{
    [self.navigationController popViewControllerAnimated:YES];
    if (self.delegate && [self.delegate respondsToSelector:@selector(transimitLab:indexPath:)]) {
        [self.delegate transimitLab:_inputTF.text indexPath:_cellRow];
    }
}

- (BOOL)textFieldShouldReturn:(UITextField *)textField
{
    [self.navigationController popViewControllerAnimated:YES];
    return YES;
}

@end
